<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Functions: generic list choosers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Functions: generic list choosers</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These functions display a window that allows the user to select items. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadefb0a59b077bb1872b25741366ca715"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__choosers.html#gadefb0a59b077bb1872b25741366ca715">choose</a> (<a class="el" href="structchooser__base__t.html">chooser_base_t</a> *ch, const void *def_item)</td></tr>
<tr class="memdesc:gadefb0a59b077bb1872b25741366ca715"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display a generic list chooser (n-column) and allow the user to select an item.  <a href="#gadefb0a59b077bb1872b25741366ca715">More...</a><br /></td></tr>
<tr class="separator:gadefb0a59b077bb1872b25741366ca715"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga862abc8600a4d9195c315e0fec27cb3a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__choosers.html#ga862abc8600a4d9195c315e0fec27cb3a">chooser_t::choose</a> (<a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> deflt=0)</td></tr>
<tr class="memdesc:ga862abc8600a4d9195c315e0fec27cb3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display a generic list chooser and allow the user to select an item.  <a href="#ga862abc8600a4d9195c315e0fec27cb3a">More...</a><br /></td></tr>
<tr class="separator:ga862abc8600a4d9195c315e0fec27cb3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae355a0659cc7cab9f7ef85b12741283a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__choosers.html#gae355a0659cc7cab9f7ef85b12741283a">chooser_multi_t::choose</a> (const <a class="el" href="pro_8h.html#a3fb92c6beff4e1e004a4ef5a2e356391">sizevec_t</a> &amp;deflt=<a class="el" href="pro_8h.html#a3fb92c6beff4e1e004a4ef5a2e356391">sizevec_t</a>())</td></tr>
<tr class="memdesc:gae355a0659cc7cab9f7ef85b12741283a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display a generic list chooser and allow the user to select an item.  <a href="#gae355a0659cc7cab9f7ef85b12741283a">More...</a><br /></td></tr>
<tr class="separator:gae355a0659cc7cab9f7ef85b12741283a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gadefb0a59b077bb1872b25741366ca715"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> choose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structchooser__base__t.html">chooser_base_t</a> *&#160;</td>
          <td class="paramname"><em>ch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>def_item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Display a generic list chooser (n-column) and allow the user to select an item. </p>
<p>Invoke the chooser with a chooser object (<a class="el" href="kernwin_8hpp.html#a4a23e389ff9cbf1cd31179ca2f393334a05f9298ac3199cb263dc375a2a3812ef" title="ui: Allow the user to choose an object. ">ui_choose</a>, <a class="el" href="kernwin_8hpp.html#ab94cbb2305bcb076985c0ac7fe6c23ada01484e487b4793359f749d2bf6e1b301" title="the generic choose() function ">chtype_generic</a>).</p>
<p>The closed() callback will be called when the window is closed. In addition, after the window is closed, the chooser instance will be delete()d unless CH_KEEP is specified (useful for global, or stack-allocated chooser instances, that must not be deleted.) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">def_item</td><td>pointer to some data that indentifies the default item For modal choosers: </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the index of the selected item (0-based) </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname"><a class="el" href="group__chooser__index.html#gga622dc2e496d61c7a8a8cb931970784eba100e0d1651b8811c7df60f02d991ef6e" title="there is no selected item ">chooser_base_t::NO_SELECTION</a></td><td>the user refused to choose anything (pressed Esc). </td></tr>
    <tr><td class="paramname"><a class="el" href="group__chooser__index.html#gga622dc2e496d61c7a8a8cb931970784eba403da04064cc128f8b3c349032275bf0" title="the chooser has no data and can not be displayed ">chooser_base_t::EMPTY_CHOOSER</a></td><td>the chooser was not created because the init() callback has returned 'false' For non-modal choosers: </td></tr>
    <tr><td class="paramname">0</td><td>the chooser was created successfully </td></tr>
    <tr><td class="paramname"><a class="el" href="group__chooser__index.html#gga622dc2e496d61c7a8a8cb931970784eba1c9909c9fe579274c2a3392f06fdab53" title="the non-modal chooser with the same data is already open ">chooser_base_t::ALREADY_EXISTS</a></td><td>did not open a new chooser because a chooser with the same object is already open. If CH_FORCE_DEFAULT is set, the cursor of the chooser will be positioned to the new item.</td></tr>
  </table>
  </dd>
</dl>
<p>see the <a class="el" href="group__choosers.html#gadefb0a59b077bb1872b25741366ca715" title="Display a generic list chooser (n-column) and allow the user to select an item. ">choose()</a> function above </p>

</div>
</div>
<a class="anchor" id="ga862abc8600a4d9195c315e0fec27cb3a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> chooser_t::choose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a>&#160;</td>
          <td class="paramname"><em>deflt</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Display a generic list chooser and allow the user to select an item. </p>
<p>May be overriden in derived choosers. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deflt</td><td>default selection or NO_SELECTION see the <a class="el" href="group__choosers.html#ga862abc8600a4d9195c315e0fec27cb3a" title="Display a generic list chooser and allow the user to select an item. ">choose()</a> function below </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae355a0659cc7cab9f7ef85b12741283a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> chooser_multi_t::choose </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="pro_8h.html#a3fb92c6beff4e1e004a4ef5a2e356391">sizevec_t</a> &amp;&#160;</td>
          <td class="paramname"><em>deflt</em> = <code><a class="el" href="pro_8h.html#a3fb92c6beff4e1e004a4ef5a2e356391">sizevec_t</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Display a generic list chooser and allow the user to select an item. </p>
<p>May be overriden in derived choosers. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deflt</td><td>default selection (may be empty) see the <a class="el" href="group__choosers.html#gae355a0659cc7cab9f7ef85b12741283a" title="Display a generic list chooser and allow the user to select an item. ">choose()</a> function below </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
